package com.bdsoft.dms.Controller;

import com.bdsoft.dms.Assistant.XiaozhiAgent;
import com.bdsoft.dms.entity.ChatForm;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Tag(name = "哈哈哈")
@RestController
@RequestMapping("xiaozhi")
public class xiaozhiController {

    @Autowired
    private XiaozhiAgent xiaozhiAgent;
    @PostMapping("chat")
    @Operation(summary = "小智")

public String chat(@RequestBody ChatForm chatForm){
    return xiaozhiAgent.chat(chatForm.getMemoryId(),chatForm.getMessage());
}
}
